#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    /*找第二大的数*/
    int a[10] = {32,321,321,321,321,321,312,21,1,3};
    int max = 0;
    int smax = 0;

    int i;
    for(i = 0; i < 10; i++)
    {
        if (a[i] > max)
        {
            smax = max;
            max = a[i];
        }
        else if (a[i] < max && a[i] > smax)
        {
            smax = a[i];
        }
    }
    printf("%d\n", smax);
    return 0;
}

